const webpack = require('webpack')
module.exports = {
  lintOnSave: false,
  productionSourceMap: false,
  configureWebpack: {
    plugins: [
      new webpack.HashedModuleIdsPlugin(),
      new webpack.optimize.ModuleConcatenationPlugin()
    ]
  },

  chainWebpack: config => {
    config.optimization
      .runtimeChunk({
        name: 'manifest'
      })
      .splitChunks({
        cacheGroups: {
          vendor: {
            test: /[\\/]node_modules[\\/]/,
            name: 'vendor',
            chunks: 'all'
          },
          'async-vendors': {
            test: /[\\/]node_modules[\\/]/,
            minChunks: 2,
            chunks: 'async',
            name: 'async-vendors'
          }
        }
      })
  },

  devServer: {
    proxy: {
      '/api/*': {
        target: 'https://hourmore.com',
        secure: false,
        changeOrigin: true
      }
    }
  },

  css: {
    extract: false
  }
}
